<extend name="./app/Tpl/Public/template.html" />
<block name="content_body">
	<div class="pad-lr-10">
		<form name="form_search" id="form_search" action="{:U('index')}" method="post">
		    <table width="100%" cellspacing="0" class="search-form">
		        <tbody>
		            <tr>
			            <td>
				            <div class="explain-col">
								<input type="text" name="title" value="{$search.title}" placeholder="供应商名称">
								<input type="text" name=product_name value="{$search.product_name}" placeholder="商品名称">
								<input type="text" name="product_code" value="{$search.product_code}" placeholder="商品代码">
								<select name="product_stock_status" style="width:150px;" class="chosen_search">
									<option value="">--入库状态--</option>
	                				<option value="0" <if condition="$search['product_stock_status'] eq '0'">selected</if>>未入库</option>
	                				<option value="1" <if condition="$search['product_stock_status'] eq '1'">selected</if>>已入库</option>
								</select>
								<input type="button"  name="form_search_btn_search"  value="查询" onclick="document.forms['form_search'].submit()"/>
				        	</div>
			            </td>
		            </tr>
		        </tbody>
		    </table>
	    </form>
	    <form  name="form_list" id="form_list" action="{:U('index')}" method="post">
		    <div class="table-list">		
			    <table width="100%" cellspacing="0">
			        <thead>
			            <tr>
			            	<th width="40" align="center">图片</th> 
			            	<th width="80" align="left">商品代码</th>
			            	<th width="150" align="left">商品名称</th>
			            	<th width="150" align="left">供应商</th>       
			                <th width="80" align="left">进货量</th>
			                <th width="80" align="left">进货金额</th>
			                <th width="80" align="left">进货日期</th>
			                <th width="80" align="left">入库状态</th>
			      			<th align="left">操作</th>
			            </tr>
			        </thead>
			    	<tbody>
						<volist name="list" id='val'>
				        <tr>
				        	<td align="center"><img src="{$val.product_id|m_prod_pic}?{$Think.now} " width=45  height=30></td>
				        	<td align="left">{$val.product_id}</td>
				        	<td align="left"><a href="#" onclick="redirect('{:U('showUpd',array('id'=>$val['id']))}')" >{$val.product_name}</a></td>
				            <td align="left">{$val.supplyer_content}</td>
				            <td align="left">{$val.product_num}</td>
				            <td align="left">￥{$val.product_amount}</td>
				            <td align="left"><empty name="val['product_send_date']">未到货<else/>{$val.product_send_date}</empty></td>
				            <td align="left"><if condition="$val['product_stock_status'] eq '0'">未入库<else/>已入库</if></td>	
				            <td align="left" class="btn">
			            		<a class="link_btn" href="#" onclick="redirect('{:U('showUpd',array('id'=>$val['id']))}')" >编辑</a>
				            </td>
				        </tr>
				        </volist>
			    	</tbody>
			    </table>
	    	</div>
	    </form>
	</div>
	<div id="dialog_content" title="弹出框"></div>
<script type="text/javascript">

$(function(){
	$( "#dialog_content" ).dialog({
		autoOpen: false,
		width:550,
		height:250
	});
})

</script>
</block>